<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      >
    
    
    <h:head>
        <title>View Reward Vouchers</title>
        <link rel="stylesheet" type="text/css" href="CSS/RandallCSS.css" />
    </h:head>
    
    
    
    
    <h:body>
        
        
        
                                    <div align="center">     
                                                <h:form>          
                                                    
                                                <div class="Heading">
                                                 <h:outputText value="#{fakeMainPortalMB.customerEmail}'s Reward Vouchers"/>
                                                </div>

                                                <br/>
                                                <br/>
                                                <br/>
                                                <p:dataTable value="#{rewardMB.getVouchersByCustomer()}" var="o"
                                                     styleClass="order-table-shoppingcart"
                                                     rowStyleClass="contentbox"
                                                     emptyMessage="No vouchers to display"
                                                     paginator="true" rows="10"
                                                     >
                                                        

                                                    <p:column style="width: 10px">
                                                        <f:facet name="header">ID</f:facet>
                                                        #{o.id}
                                                    </p:column>
                                                    
                                                    
                                                    <p:column style="width: 50px">
                                                        <f:facet name="header">Name</f:facet>
                                                        #{o.reward_Name}
                                                    </p:column>

                                                    <p:column style="width: 80px">
                                                        <f:facet name="header">Description</f:facet>
                                                        <h:outputText value="#{o.reward_Description}" escape="false"/>
                                                        
                                                    </p:column>

                                                    <p:column style="width: 10px">
                                                        <f:facet name="header">Points Cost</f:facet>
                                                        #{o.reward_Cost}
                                                    </p:column>
                                                    
                                                    <p:column style="width: 40px">
                                                        <f:facet name="header">Purchase Date</f:facet>
                                                        #{o.purchaseDate}
                                                    </p:column>
                                                    
                                                    <p:column style="width: 40px">
                                                        <f:facet name="header">Redemption Date</f:facet>
                                                        #{o.redemptionDate}
                                                    </p:column>
                                                    
                                                </p:dataTable>
                                                <br/>
                                                <br/>
                                                <p:commandButton value="Go back" action="index.xhtml?faces-redirect=true"/> 
                                                </h:form>
                                </div>
        
        
        
    </h:body>
    
    
</html>

